package com.cloudbroker.bcs.platform.ltb.middle.service.impl;

import com.cloudbroker.bcs.common.dao.base.DAOBase;
import com.cloudbroker.bcs.platform.ltb.common.config.ConfigValues;
import com.cloudbroker.bcs.platform.ltb.middle.dao.PushListDAO;
import com.cloudbroker.bcs.platform.ltb.middle.entity.PushList;
import com.cloudbroker.bcs.platform.ltb.middle.entityview.PushListParam;
import com.cloudbroker.bcs.platform.ltb.middle.service.PushListService;
import com.cloudbroker.bcs.platform.ltb.middle.service.base.TenantServiceImplBase;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by daibd19671 on 2016/12/16.
 */
@Service
public class PushListServiceImpl extends TenantServiceImplBase<PushList, String> implements PushListService {
    @Resource
    private PushListDAO pushListDAO;

    @Override
    protected DAOBase<PushList, String> getDAO() {
        return pushListDAO;
    }

    public void addPushList(PushList pushList) {
        pushList.setMycat_flag(ConfigValues.getMycatFlag());
        pushListDAO.addPushList(pushList);
    }

    public List<PushList> selectPushList(PushListParam param) {
        return pushListDAO.selectPushList(param);
    }

    public Integer countPushList(PushListParam param) {
        return pushListDAO.countPushList(param);
    }

    @Override
    public PushList getPushList(PushList pushList) {
        return pushListDAO.getPushList(pushList);
    }

    @Override
    public void updatePushList(PushList pushList) {
        pushListDAO.updatePushList(pushList);
    }
}
